import { createApp } from 'vue'
import './style.css'
import App from './App.vue'
import router from './router'
import "vant/lib/index.css"
import "lib-flexible/flexible"

import { Button,Tabbar,TabbarItem,Form,Field,Icon,NavBar,Popup,DatetimePicker,Cell,CellGroup,PullRefresh,List,NumberKeyboard,Dialog,Progress,Rate} from 'vant'
import dayjs from 'dayjs'


const app = createApp(App)

app.config.globalProperties.$filters = {
    transTime(date){
        return dayjs(Number(date)).format("HH:mm")
    },
    transDay(value){
        return dayjs(value).format("MM-DD")
    },
    transYDM(value){
        return dayjs(value).format("YYYY-MM-DD HH-mm")
    }
}

app.use(router)

app.use(Button).use(Tabbar).use(TabbarItem).use(Form).use(Field).use(Icon).use(NavBar).use(Popup).use(DatetimePicker).use(Cell);
app.use(CellGroup);
app.use(PullRefresh);
app.use(List);
app.use(NumberKeyboard);
app.use(Dialog);
app.use(Rate);
app.use(Progress);

app.mount('#app')